import { Component } from '@angular/core';

@Component({
  selector: 'app-tab1',
  templateUrl: 'tab1.page.html',
  styleUrls: ['tab1.page.scss']
})
export class Tab1Page {


  public list:any[]=[];
  constructor(){

      for(var i=0;i<10;i++){

        this.list.push(`我是第${i}条数据`);
      }
  }

  doRefresh(event){

    setTimeout(()=>{
      for(var i=10;i<15;i++){

        this.list.unshift(`我是第${i}条数据`);        
      }
      event.target.complete();    //告诉ion-refresher  更新数据

    },2000)

  }
}
